package com.qiu.exceldeal.devtest;


import com.qiu.exceldeal.devtest.bean.TestPojo;
import com.qiu.exceldeal.core.ExcelDeal;

import java.io.File;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @Author FireChildren
 * @create 2020/7/1 15:13
 */

public class Ftest {
    public static void main(String[] args) {
        TestPojo testPojo = new TestPojo(1,"qiu","18","firechildren",new Date());
        TestPojo testPojo2 = new TestPojo(2,"fire","21","king",new Date());
        List<TestPojo> list = new ArrayList<>();
        list.add(testPojo);
        list.add(testPojo2);


        ExcelDeal<TestPojo> excelDeal = new ExcelDeal<>(TestPojo.class);

        File nullfile = new File("firechildren.xls");
        //生成报表
        File file = excelDeal.generate(list,nullfile);
        //解析
        List<TestPojo> analysis = excelDeal.analysis(nullfile);
        System.out.println(analysis);
    }
}
